package com.frame.work.controller;


import com.baomidou.mybatisplus.extension.api.ApiController;
import com.baomidou.mybatisplus.extension.api.R;
import com.frame.work.frame.deal.device0faa.BaLiuXingRenTiGanYingMianBan_0FAA8105;
import com.frame.work.mapper.SelectDeviceMapper;

import com.frame.work.service.TblSecurityLogService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 宿舍房间(DormitoryRoom)表控制层
 *
 * @author wjming
 * @since 2020-04-10 11:15:12
 */
@RestController
@RequestMapping("/room")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class TestController extends ApiController {
    /**
     * 服务对象
     */
    @Autowired
    private SelectDeviceMapper testMapper;

    @Autowired
    private TblSecurityLogService tblSecurityLogService;

    //private final TestMapper testMapper;


    /**
     * 通过主键查询单条数据
     *
     * @return 单条数据
     */
    @GetMapping("/id")
    public R selectOne() {

        String a = "12345678901234567890123456789012345678901234567890";
        //String b = "12345678901234567890123456789012345678901234567890";
        //String b = "12345678901234567890123456080007FF567890123456789" ;
        String b = "12E5F2AC10006F0D0090123456080007FF567890123456702";
        //baLiuXingRenTiGanYingMianBan_0FAA8105.BaLiuXingRenTiGanYingMianBan_0FAA8105(a,b);
        BaLiuXingRenTiGanYingMianBan_0FAA8105 test = new BaLiuXingRenTiGanYingMianBan_0FAA8105(a, b);
        //test.ZhiWenSuo_LiuFu_0FBE0203_control(a,b);


        // List<DeviceZy> list = deviceZyService.list();
        // System.out.println(list);

        //BaLiuXingRenTiGanYingMianBan_0FAA8105 baLiuXingRenTiGanYingMianBan_0FAA8105 = new BaLiuXingRenTiGanYingMianBan_0FAA8105("111111111111111111111111111111111111111111111111111111111111111","111111111111111111111111111111111111111111111111111111111111111111111");
        // System.out.println("ccccc"+baLiuXingRenTiGanYingMianBan_0FAA8105);
        //QueryWrapper<DeviceZy> queryWrapper = new QueryWrapper<>();
        //List<DeviceZy> deviceZIES = this.testMapper.selectList(queryWrapper);
        //System.out.println(deviceZIES);
        //String time = this.testMapper.getTime();
        //System.out.println(time);
        return success(test);

    }

    /**
     * 通过主键查询单条数据
     *
     * @return 单条数据
     */
    @GetMapping("/Log")
    public R selectLog(@RequestParam("start") String a, @RequestParam("end") String b) {

        //String a ="2020-09-10";
        //String b = "2020-09-20";
        //List<TblSecurityLog> tblSecurityLogs = tblSecurityLogService.selectByTime(a, b);
        // return success(tblSecurityLogs);
        return success(null);

    }

}
